home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / dosguide.exe / HELPDOS.ZIP / COPY.HLP < prev    next >
Text File  |  1985-09-10  |  7KB  |  165 lines

  1. -------------------------  COPY - Internal DOS Command  ------------------------
  2.  
  3. COPY copies one or more files between disks or other devices.
  4.  
  5. FORMAT:   COPY [/A][/B][d1:][path1]filename1[.ext1][/A][/B]
  6.                [d2:][path2][filename[.ext]][/A][/B][/V]
  7.  
  8.                or, to concatenate files during the copy:
  9.  
  10.           COPY [/A][/B][d1:][path1]filename1[.ext1][/A][/B]
  11.                [+[[,,]d1:][path1]filename1[.ext][/A][/B]...]
  12.                [d2:][path2][filename2[.ext]][/A][/B][/V]
  13.  
  14. REMARKS:
  15.  
  16.    Source File(s):
  17.  
  18.       d1        - the drive letter of the disk whose file is to be copied.  If
  19.                   omitted, the default drive is assumed.
  20.       path1     - the directory path of the directory containing the file to be
  21.                   copied.  If omitted, the current directory is assumed.
  22.       filename1 - the filename of the file to be copied.
  23.       .ext1     - the filename extension of the file to be copied.
  24.  
  25.    Target File(s):
  26.  
  27.       d2        - the drive letter of the disk which will receive the copied
  28.                   file.  If omitted, the default drive is assumed.
  29.       path2     - the directory path of the directory which will receive the
  30.                   copied file.  If omitted, the current directory is assumed.
  31.       filename2 - the filename of the new copy of the file.
  32.      .ext2      - the filename extension of the new copy of the file.
  33.  
  34.  
  35.    Global characters (* and ?) are allowed in all filenames and extensions.
  36.  
  37.    If a target file exists, it will be replaced with the copied file.
  38.  
  39.    When copying to the same disk, new filenames must be given unless the copying
  40.    is done into another directory.
  41.  
  42.    If the target is a directory (a path is specified but filename.ext is
  43.    omitted), then files are copied into that directory without changing their
  44.    names.
  45.  
  46.    When copying to another disk or to a directory on the same disk, the original
  47.    filenames may be retained or they may be changed.
  48.  
  49.    When concatenating (combining) files, if a target filename is not given, the
  50.    files are combined and given the name of the first source file.
  51.  
  52.    If a file to be copied is marked as read-only, the resultant copy will not be
  53.    marked as read-only.
  54.  
  55.    [,,] is a special parameter used to update the directory entry for a single
  56.    file with the current date and time.  It must be used with the + parameter
  57.    (see example below).  Global characters (* and ?) may not be used in this
  58.    special form of COPY.
  59.  
  60.    /V added at the end causes verification that the copy is recorded correctly.
  61.    This performs the same function as the VERIFY ON command.  If VERIFY is ON,
  62.    then /V is redundant.  COPY will run more slowly with verification on.
  63.  
  64.    /A and /B - with /A, COPY treats the file as a text (ASCII) file.  With /B,
  65.    COPY treats the file as a program file (binary).  If neither /A or /B is
  66.    specified, and files are not copied with concatenation, then /B is assumed.
  67.    If files are concatenated, then /A is assumed.  The effect of these two
  68.    parameters depends on their position in the command:
  69.  
  70.           Used with source files:
  71.  
  72.                /A - treats the file as a text (ASCII) file.  Copies all
  73.                     information up to, but not including, the end-of-file
  74.                     marker (CTRL-Z).  Information after the end-of-file marker
  75.                     is ignored.
  76.                /B - treats the file as binary and copies the entire file,
  77.                     including the end-of-file marker (CTRL-Z).
  78.  
  79.           Used with target files:
  80.  
  81.                /A - adds an end-of-file marker to the end of the file.
  82.                /B - does not add an end-of-file marker.
  83.  
  84.           /A and /B apply to the file or files immediately preceding the /A or
  85.           /B specification.  These parameters may also be placed before the
  86.           first source filename.  /A and /B stay in effect until another /A or
  87.           /B is encountered in the command line.
  88.  
  89.  
  90.    COPY can also be used to copy files between system devices (see last two
  91.    examples below).  The COM and AUX devices may not be specified.
  92.  
  93.  
  94. WARNING:  If the target file already exists, the COPY command will replace its
  95.    contents with the contents of the source file.  The COPY command does not
  96.    inform you that this will occur.
  97.  
  98.  
  99. EXAMPLES:
  100.  
  101. Copy the file FILE1.DAT from the current directory on drive A to the current
  102. directory on drive B.  The copied file is to have the same name as the original.
  103. The default drive is A:
  104.  
  105.           COPY FILE1.DAT B:
  106.  
  107.  
  108. Copy the file FILE1.DAT from the current directory on drive A to the current
  109. directory on drive B.  The copied file is to have the name FILE1.BAK on the
  110. drive B disk:
  111.  
  112.           COPY FILE1.DAT B:FILE1.BAK
  113.  
  114.  
  115. Copy all files in the DATA directory on drive C disk that have a filename
  116. extension of .DAT.  The files are copied to the current directory on drive A.
  117. The copies will have the same names as the originals.  The DATA directory is a
  118. subdirectory of the root directory:
  119.  
  120.           COPY C:\DATA\*.DAT A:
  121.  
  122.  
  123. Copy all files in the current directory on drive B that have a six character
  124. filename where the first four characters are "ACCT," and a filename extension of
  125. .DAT.  The files are to be copied to the current directory on drive A.  The /V
  126. parameter is specified to ensure that the copied file can be read without error:
  127.  
  128.           COPY B:ACCT??.DAT A:/V
  129.  
  130.  
  131. Copy and combine (concatenate) the files MEMO1, MEMO2 and MEMO3.  These files
  132. are in the current directory of the default drive and are to be copied as
  133. MEMOS.BAK to the root directory of drive B:
  134.  
  135.           COPY MEMO1+MEMO2+MEMO3 B:\MEMOS.BAK
  136.  
  137.  
  138. Update the directory entry for file MYFILE with the current time and date.
  139. MYFILE is in the current directory on the default drive:
  140.  
  141.           COPY MYFILE+,,
  142.  
  143.  
  144. Create the file AUTOEXEC.BAT in the root directory of the default drive by using
  145. COPY to copy keyboard input to the file.  The file is to have one line,
  146. PATH \HELPDOS:
  147.  
  148.           COPY CON: \AUTOEXEC.BAT
  149.           PATH \HELPDOS
  150.  
  151.           You must press F6 (to denote end-of-file) and then RETURN to end this
  152.           type of copy operation.  If you have reassigned the standard meaning
  153.           of F6, then press the key you have assigned to CTRL-Z (instead of F6).
  154.  
  155.  
  156. COPY keyboard input directly to the printer.  The printer is device LPT1:
  157.  
  158.           COPY CON: LPT1:
  159.           This is a test of printing what is typed on the keyboard.
  160.           This is useful for "quick notes."
  161.  
  162.           You must press F6 (to denote end-of-file) and then RETURN to end this
  163.           type of copy operation.  If you have reassigned the standard meaning
  164.           of F6, then press the key you have assigned to CTRL-Z (instead of F6).
  165.